﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Master/List.Master" AutoEventWireup="true" CodeBehind="DicTypeList.aspx.cs" Inherits="DevFx.Web.Pages.Base.DicTypeList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderHeader" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {
            gridview("<%=gvList.ClientID %>");
            $("#<%=gvList.ClientID %>").mouseover(function () {
                $(this).css("cursor", "hand");
            });
        });
        function show(id, flag) {
          //  return window.showModalDialog("DicTypeEdit.aspx?time=" + new Date() + "&&id=" + id + "&&flag=" + flag, '', "dialogWidth:600px;dialogHeight:350px;center:yes;status:no;scroll:yes;help:no;");
            return showWin("DicTypeEdit.aspx?time=" + new Date() + "&&id=" + id + "&&flag=" + flag, 600, 350);
        }
       
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<div  class="top">
    <asp:Button  runat="server" ID="btnadd"   CssClass="button2" Text=" 添 加 "  
        OnClientClick="return show('','1');" onclick="btnadd_Click"/>
    <asp:Button  runat="server" ID="btndel" Text=" 禁 用 " CssClass="button2" onclick="btndel_Click"  OnClientClick='return DisabledCount("<%=gvList.ClientID %>");'/>
    <asp:Button  runat="server" ID="btnEnabld" Text=" 启 用 " CssClass="button2" onclick="btnEnabld_Click"  OnClientClick='return abledCount("<%=gvList.ClientID %>");'/>
</div>
<div class="search">

   Name:<asp:TextBox runat="server" ID="tbxName" ></asp:TextBox>
   Code:<asp:TextBox runat="server" ID="tbxCode"></asp:TextBox>
   状态:
    <asp:DropDownList ID="ddlStatus" runat="server">
        <asp:ListItem></asp:ListItem>
        <asp:ListItem Value="False">启用</asp:ListItem>
        <asp:ListItem Value="True">禁用</asp:ListItem>
    </asp:DropDownList>
   <asp:Button  runat="server" ID="tbxButtonSerch" Text=" 查 询 " CssClass="button2" onclick="tbxButtonSerch_Click"/>
</div>

    <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="False" 
        CssClass="gv" AllowSorting="True"
        BorderStyle="None" onsorting="gvList_Sorting" 
        onrowcommand="gvList_RowCommand">
        <Columns>
             <asp:TemplateField>
                <ItemTemplate>
                    <asp:CheckBox ID="cbx1" runat="server" />
                </ItemTemplate>
                <HeaderTemplate>
                    <asp:CheckBox ID="cbx1" runat="server" />
                </HeaderTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="TypeName" HeaderText="名称" SortExpression="TypeName" />
            <asp:BoundField DataField="TypeCode" HeaderText="Code" SortExpression="TypeCode" />
             <asp:TemplateField HeaderText="状态" SortExpression="Disabled">
                 <ItemTemplate>
                     <%#Eval("Disabled").ToString().ToLower()=="true"?"禁用":"启用"%>
                 </ItemTemplate>
             </asp:TemplateField>
            <asp:TemplateField HeaderText="">
                <ItemTemplate>
                    <img  src="../../Contents/images/edit.gif" height="13" width="13" alt=""/>
                    <asp:LinkButton runat="server"  ID="btnlink"  OnClientClick='<%# " return show(\"" + Eval("TypeID").ToString() + "\",2);" %>' Text="编辑" CommandName="editing"></asp:LinkButton>
                    <asp:HiddenField  runat="server" ID="hfID" Value='<%#Eval("TypeID") %>'/>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
   
</asp:Content>
